package com.byxy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;


import javax.persistence.Table;

@Table(name="user")
@Entity
public class User {
	
	private int id;
	
	private String username;
	
	private String login;
	
	private String password;
	

	@Column(name = "login", length = 20)
	public String getLogin() {
		return login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name = "username", length = 20)
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name = "password", length = 20)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public User() {
		
	}
	public User(int id, String username, String login, String password) {
	
		this.id = id;
		this.username = username;
		this.login = login;
		this.password = password;
	}
}
